/*!
\file DCommonData.h
\brief Contains declaration of DCommonData.
\ingroup DOT
*/

#ifndef DCOMMONDATA_H
#define DCOMMONDATA_H

#include<QList>
#include<QString>
#include<QStringList>

/*!
\class DCommonData
\brief Convenience class used as base for DNodeData and DEdgeData. This class keeps DOT parameters used by both child classes.
\ingroup DOT
*/

class DCommonData{
public:
	DCommonData();
	//!< Constructor.
	~DCommonData();
	//!< Destructor.
	
	void setOption( QString option, QString value );
	//!< Set option to value.
	QString getOption( QString option )const;
	//!< Return value of option.
protected:
	QList<QString> m_options;//!< Contains list of names of options.
	QList<QString> m_values;//!< Contains list of values for options in m_options.
	QList<QString> m_colourStack;//!< Contains stack of colours.
	
	void _setOptions( QString options );//!< Parses options in DOT language and fills out its members.
	QString _dotOptions()const;//!< Returns its options in DOT language.
};

#endif
